<div class="hardwares view">
<h2><?php  __('Hardware');?></h2>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $hardware['Hardware']['id']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Computer'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $this->Html->link($hardware['Computer']['name'], array('controller' => 'computers', 'action' => 'view', $hardware['Computer']['id'])); ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Manufacturer'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $hardware['Hardware']['manufacturer']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Product Name'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $hardware['Hardware']['product_name']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id Number'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $hardware['Hardware']['id_number']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Chassis'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $hardware['Hardware']['chassis']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Total Memory'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $hardware['Hardware']['total_memory']; ?>
			&nbsp;
		</dd>
	</dl>
<div class="right">
<?php echo $this->Html->link(__('Edit Hardware', true), array('action' => 'edit', $hardware['Hardware']['id'])); ?> &nbsp; &nbsp; &nbsp
<?php echo $this->Html->link(__('Delete Hardware', true), array('action' => 'delete', $hardware['Hardware']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $hardware['Hardware']['id'])); ?>&nbsp; &nbsp; &nbsp;
<?php echo $this->Html->link('Back to Computer', array('controller' => 'computers', 'action' => 'view', $hardware['Computer']['id'])); ?>
</div>


	<h3><?php __('CD Drives');?></h3>
	<?php if (!empty($hardware['Cd'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th width="200px"><?php __('Name'); ?></th>
		<th><?php __('Manufacturer'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($hardware['Cd'] as $cd):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $cd['name'];?></td>
			<td><?php echo $cd['manufacturer'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'cds', 'action' => 'view', $cd['id']), array('title'=> 'View CD','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'cds', 'action' => 'edit', $cd['id']), array('title'=> 'Edit CD','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'cds', 'action' => 'delete', $cd['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $cd['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="right">
	<?php echo $this->Html->link(__('New Cd', true), array('controller' => 'cds', 'action' => 'add/'.$hardware['Hardware']['id']), array('title' => 'Adding a new Network', 'onclick' => "Modalbox.show(this.href, {title: this.title, width: 500}); return false;"));?>
	</div>

	<h3><?php __('Processors');?></h3>
	<?php if (!empty($hardware['Processor'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th width="200px"><?php __('Name'); ?></th>
		<th><?php __('Description'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($hardware['Processor'] as $processor):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $processor['name'];?></td>
			<td><?php echo $processor['description'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'processors', 'action' => 'view', $processor['id']), array('title'=> 'View Processor','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'processors', 'action' => 'edit', $processor['id']), array('title'=> 'Edit Processor','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'processors', 'action' => 'delete', $processor['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $processor['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="right">
	<?php echo $this->Html->link(__('New Processor', true), array('controller' => 'processors', 'action' => 'add/'.$hardware['Hardware']['id']), array('title' => 'Adding a new Network', 'onclick' => "Modalbox.show(this.href, {title: this.title, width: 500}); return false;"));?>
	</div>
        

	<h3><?php __('Soundcards');?></h3>
	<?php if (!empty($hardware['Soundcard'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th width="200px"><?php __('Name'); ?></th>
		<th><?php __('Manufacturer'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($hardware['Soundcard'] as $soundcard):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $soundcard['name'];?></td>
			<td><?php echo $soundcard['manufacturer'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'soundcards', 'action' => 'view', $soundcard['id']), array('title'=> 'View Soundcard','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'soundcards', 'action' => 'edit', $soundcard['id']), array('title'=> 'Edit Soundcard','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'soundcards', 'action' => 'delete', $soundcard['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $soundcard['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="right">
	<?php echo $this->Html->link(__('New Soundcard', true), array('controller' => 'soundcards', 'action' => 'add/'.$hardware['Hardware']['id']), array('title' => 'Adding a new Network', 'onclick' => "Modalbox.show(this.href, {title: this.title, width: 500}); return false;"));?>
	</div>
        

	<h3><?php __('Storage');?></h3>
	<?php if (!empty($hardware['Storage'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th width="200px"><?php __('Name'); ?></th>
		<th><?php __('Disk Size'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($hardware['Storage'] as $storage):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $storage['name'];?></td>
			<td><?php echo $storage['disk_size'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'storages', 'action' => 'view', $storage['id']), array('title'=> 'View Storage','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'storages', 'action' => 'edit', $storage['id']), array('title'=> 'Edit Storage','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'storages', 'action' => 'delete', $storage['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $storage['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="right">
	<?php echo $this->Html->link(__('New Storage', true), array('controller' => 'storages', 'action' => 'add/'.$hardware['Hardware']['id']), array('title' => 'Adding a new Network', 'onclick' => "Modalbox.show(this.href, {title: this.title, width: 500}); return false;"));?>
	</div>

	<h3><?php __('Videocards');?></h3>
	<?php if (!empty($hardware['Videocard'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th width="200px"><?php __('Name'); ?></th>
		<th><?php __('Adapter Ram'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($hardware['Videocard'] as $videocard):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $videocard['name'];?></td>
			<td><?php echo $videocard['adapter_ram'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'videocards', 'action' => 'view', $videocard['id']), array('title'=> 'View VideoCard','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'videocards', 'action' => 'edit', $videocard['id']), array('title'=> 'Edit VideoCard','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'videocards', 'action' => 'delete', $videocard['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $videocard['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="right">
	<?php echo $this->Html->link(__('New Videocard', true), array('controller' => 'videocards', 'action' => 'add/'.$hardware['Hardware']['id']), array('title' => 'Adding a new Network', 'onclick' => "Modalbox.show(this.href, {title: this.title, width: 500}); return false;"));?>
	</div>
</div>
